<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.entity.Users"%>

<html>
	<head>
		<title>用户表</title>
	</head>
	<link rel="styleSheet"
		href="<%=request.getContextPath()%>/background/css/body.css"
		type="text/css" media="all" />
	<body onload="init()">
		<%
			List<Users> users = (List<Users>) request.getAttribute("users");
		%>
		<table>
			<caption>
				<font size="5"><strong>用户信息列表</strong>
				</font>
			</caption>
			<tr>
				<th>
					用户ID
				</th>
				<th>
					用户名
				</th>
				<th>
					密码
				</th>
				<th>
					操作
				</th>

			</tr>
			<%
				for (Users user : users) {
			%>
			<tr align="center" onmouseover="this.bgColor='#E6EB00'"
				onmouseout="this.bgColor='white'">
				<td><%=user.getUser_id()%><br>
				</td>
				<td><%=user.getUser_name()%></td>
				<td><%=user.getUser_password()%></td>

				<td>
					<a
						href="/myblog/servlet/DelectUsersByIdServlet?user_id=<%=user.getUser_id()%>">删除</a>
				</td>
			</tr>
			<%
				}
			%>
			<tr>
				<td colspan="4">
					<p align="left">
						<font size="3" face="微软雅黑"><strong><a
								href="/myblog/background/adduser.jsp">新增</a>
						</strong>
						</font>
					</p>
				</td>
			</tr>
		</table>
	</body>

</html>
